<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
<html><head>
<title>hg.wiki</title>
<style>
body {
    background:white;
    margin: 0em 1em 10em 1em;
    color: black;
}

h1 { color: white; background: #4FA4FF; }
h2 { color: white; background: #4FA4FF; }
h3 { color: white; background: #00557F; }
h4 { color: white; background: #00557F; }
    
a { color: #AA5500; }

</style>
</head>
<body><a NAME="top" ID="top"></a>
<h1>hg.wiki</h1>

<h3>Global Attributes</h3>
<table>
<tr><td>_ADMIN_EMAIL</td></tr><tr><td>_DEBUG</td></tr><tr><td>_SETTINGS</td></tr><tr><td>_WIKI_URLS</td></tr><tr><td>__author__</td></tr>
</table>
<h3>Classes</h3>
<table>
<tr>
<td><a href="#BasePublicPage">BasePublicPage</a></td>
<td></td>
</tr><tr>
<td><a href="#ChangesHandler">ChangesHandler</a></td>
<td></td>
</tr><tr>
<td><a href="#EditHandler">EditHandler</a></td>
<td></td>
</tr><tr>
<td><a href="#EditUserProfileHandler">EditUserProfileHandler</a></td>
<td>This allows a user to edit his or her wiki profile.</td>
</tr><tr>
<td><a href="#GetUserPhotoHandler">GetUserPhotoHandler</a></td>
<td>This is a class that handles serving the image for a user</td>
</tr><tr>
<td><a href="#HistoryHandler">HistoryHandler</a></td>
<td></td>
</tr><tr>
<td><a href="#IndexHandler">IndexHandler</a></td>
<td></td>
</tr><tr>
<td><a href="#InterwikiHandler">InterwikiHandler</a></td>
<td></td>
</tr><tr>
<td><a href="#SendAdminEmail">SendAdminEmail</a></td>
<td>Sends the admin email.</td>
</tr><tr>
<td><a href="#Settings">Settings</a></td>
<td></td>
</tr><tr>
<td><a href="#SettingsHandler">SettingsHandler</a></td>
<td></td>
</tr><tr>
<td><a href="#UpgradeHandler">UpgradeHandler</a></td>
<td></td>
</tr><tr>
<td><a href="#UserProfileHandler">UserProfileHandler</a></td>
<td>Allows a user to view another user's profile.</td>
</tr><tr>
<td><a href="#UsersHandler">UsersHandler</a></td>
<td></td>
</tr><tr>
<td><a href="#ViewDiffHandler">ViewDiffHandler</a></td>
<td></td>
</tr><tr>
<td><a href="#ViewHandler">ViewHandler</a></td>
<td></td>
</tr><tr>
<td><a href="#ViewRevisionListHandler">ViewRevisionListHandler</a></td>
<td></td>
</tr>
</table>
<h3>Functions</h3>
<table>
<tr>
<td><a href="#main">main</a></td>
<td></td>
</tr>
</table>
<hr /><hr />
<a NAME="BasePublicPage" ID="BasePublicPage"></a>
<h2>BasePublicPage</h2>

<h3>Derived from</h3>
BaseRequestHandler
<h3>Class Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<td><a href="#BasePublicPage.generateRss">generateRss</a></td>
<td></td>
</tr><tr>
<td><a href="#BasePublicPage.getStartPage">getStartPage</a></td>
<td></td>
</tr><tr>
<td><a href="#BasePublicPage.get_current_user">get_current_user</a></td>
<td></td>
</tr><tr>
<td><a href="#BasePublicPage.get_page_cache_key">get_page_cache_key</a></td>
<td></td>
</tr><tr>
<td><a href="#BasePublicPage.get_page_name">get_page_name</a></td>
<td></td>
</tr><tr>
<td><a href="#BasePublicPage.get_wiki_user">get_wiki_user</a></td>
<td></td>
</tr><tr>
<td><a href="#BasePublicPage.handle_exception">handle_exception</a></td>
<td></td>
</tr><tr>
<td><a href="#BasePublicPage.initialize">initialize</a></td>
<td></td>
</tr><tr>
<td><a href="#BasePublicPage.notifyUser">notifyUser</a></td>
<td></td>
</tr>
</table>
<a NAME="BasePublicPage.generateRss" ID="BasePublicPage.generateRss"></a>
<h4>BasePublicPage.generateRss</h4>
<b>generateRss</b>(<i>template_name, template_values={}</i>)
<a NAME="BasePublicPage.getStartPage" ID="BasePublicPage.getStartPage"></a>
<h4>BasePublicPage.getStartPage</h4>
<b>getStartPage</b>(<i></i>)
<a NAME="BasePublicPage.get_current_user" ID="BasePublicPage.get_current_user"></a>
<h4>BasePublicPage.get_current_user</h4>
<b>get_current_user</b>(<i>back=None</i>)
<a NAME="BasePublicPage.get_page_cache_key" ID="BasePublicPage.get_page_cache_key"></a>
<h4>BasePublicPage.get_page_cache_key</h4>
<b>get_page_cache_key</b>(<i>page_name, revision_number=None</i>)
<a NAME="BasePublicPage.get_page_name" ID="BasePublicPage.get_page_name"></a>
<h4>BasePublicPage.get_page_name</h4>
<b>get_page_name</b>(<i>page_title</i>)
<a NAME="BasePublicPage.get_wiki_user" ID="BasePublicPage.get_wiki_user"></a>
<h4>BasePublicPage.get_wiki_user</h4>
<b>get_wiki_user</b>(<i>create=False, back=None</i>)
<a NAME="BasePublicPage.handle_exception" ID="BasePublicPage.handle_exception"></a>
<h4>BasePublicPage.handle_exception</h4>
<b>handle_exception</b>(<i>e, debug_mode</i>)
<a NAME="BasePublicPage.initialize" ID="BasePublicPage.initialize"></a>
<h4>BasePublicPage.initialize</h4>
<b>initialize</b>(<i>request, response</i>)
<a NAME="BasePublicPage.notifyUser" ID="BasePublicPage.notifyUser"></a>
<h4>BasePublicPage.notifyUser</h4>
<b>notifyUser</b>(<i>address, message</i>)

<div align="right"><a href="#top">Up</a></div>
<hr /><hr />
<a NAME="ChangesHandler" ID="ChangesHandler"></a>
<h2>ChangesHandler</h2>

<h3>Derived from</h3>
BasePublicPage
<h3>Class Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<td><a href="#ChangesHandler.get">get</a></td>
<td></td>
</tr>
</table>
<a NAME="ChangesHandler.get" ID="ChangesHandler.get"></a>
<h4>ChangesHandler.get</h4>
<b>get</b>(<i></i>)

<div align="right"><a href="#top">Up</a></div>
<hr /><hr />
<a NAME="EditHandler" ID="EditHandler"></a>
<h2>EditHandler</h2>

<h3>Derived from</h3>
BasePublicPage
<h3>Class Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<td><a href="#EditHandler.get">get</a></td>
<td></td>
</tr><tr>
<td><a href="#EditHandler.post">post</a></td>
<td></td>
</tr>
</table>
<a NAME="EditHandler.get" ID="EditHandler.get"></a>
<h4>EditHandler.get</h4>
<b>get</b>(<i></i>)
<a NAME="EditHandler.post" ID="EditHandler.post"></a>
<h4>EditHandler.post</h4>
<b>post</b>(<i></i>)

<div align="right"><a href="#top">Up</a></div>
<hr /><hr />
<a NAME="EditUserProfileHandler" ID="EditUserProfileHandler"></a>
<h2>EditUserProfileHandler</h2>
<p>
This allows a user to edit his or her wiki profile.  The user can upload
     a picture and set a feed URL for personal data
</p>
<h3>Derived from</h3>
BasePublicPage
<h3>Class Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<td><a href="#EditUserProfileHandler.get">get</a></td>
<td></td>
</tr><tr>
<td><a href="#EditUserProfileHandler.post">post</a></td>
<td></td>
</tr>
</table>
<a NAME="EditUserProfileHandler.get" ID="EditUserProfileHandler.get"></a>
<h4>EditUserProfileHandler.get</h4>
<b>get</b>(<i>user</i>)
<a NAME="EditUserProfileHandler.post" ID="EditUserProfileHandler.post"></a>
<h4>EditUserProfileHandler.post</h4>
<b>post</b>(<i>user</i>)

<div align="right"><a href="#top">Up</a></div>
<hr /><hr />
<a NAME="GetUserPhotoHandler" ID="GetUserPhotoHandler"></a>
<h2>GetUserPhotoHandler</h2>
<p>
This is a class that handles serving the image for a user
</p><p>
     The template requests /getphoto/example@test.com and the handler
     retrieves the photo from the datastore, sents the content-type
     and returns the photo
</p>
<h3>Derived from</h3>
BasePublicPage
<h3>Class Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<td><a href="#GetUserPhotoHandler.get">get</a></td>
<td></td>
</tr>
</table>
<a NAME="GetUserPhotoHandler.get" ID="GetUserPhotoHandler.get"></a>
<h4>GetUserPhotoHandler.get</h4>
<b>get</b>(<i>user</i>)

<div align="right"><a href="#top">Up</a></div>
<hr /><hr />
<a NAME="HistoryHandler" ID="HistoryHandler"></a>
<h2>HistoryHandler</h2>

<h3>Derived from</h3>
BasePublicPage
<h3>Class Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<td><a href="#HistoryHandler.get">get</a></td>
<td></td>
</tr>
</table>
<a NAME="HistoryHandler.get" ID="HistoryHandler.get"></a>
<h4>HistoryHandler.get</h4>
<b>get</b>(<i></i>)

<div align="right"><a href="#top">Up</a></div>
<hr /><hr />
<a NAME="IndexHandler" ID="IndexHandler"></a>
<h2>IndexHandler</h2>

<h3>Derived from</h3>
BasePublicPage
<h3>Class Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<td><a href="#IndexHandler.get">get</a></td>
<td></td>
</tr>
</table>
<a NAME="IndexHandler.get" ID="IndexHandler.get"></a>
<h4>IndexHandler.get</h4>
<b>get</b>(<i></i>)

<div align="right"><a href="#top">Up</a></div>
<hr /><hr />
<a NAME="InterwikiHandler" ID="InterwikiHandler"></a>
<h2>InterwikiHandler</h2>

<h3>Derived from</h3>
BasePublicPage
<h3>Class Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<td><a href="#InterwikiHandler.get">get</a></td>
<td></td>
</tr>
</table>
<a NAME="InterwikiHandler.get" ID="InterwikiHandler.get"></a>
<h4>InterwikiHandler.get</h4>
<b>get</b>(<i></i>)

<div align="right"><a href="#top">Up</a></div>
<hr /><hr />
<a NAME="SendAdminEmail" ID="SendAdminEmail"></a>
<h2>SendAdminEmail</h2>
<p>
Sends the admin email.
</p><p>
     The user must be signed in to send email to the admins
</p>
<h3>Derived from</h3>
BasePublicPage
<h3>Class Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<td><a href="#SendAdminEmail.get">get</a></td>
<td></td>
</tr><tr>
<td><a href="#SendAdminEmail.post">post</a></td>
<td></td>
</tr>
</table>
<a NAME="SendAdminEmail.get" ID="SendAdminEmail.get"></a>
<h4>SendAdminEmail.get</h4>
<b>get</b>(<i></i>)
<a NAME="SendAdminEmail.post" ID="SendAdminEmail.post"></a>
<h4>SendAdminEmail.post</h4>
<b>post</b>(<i></i>)

<div align="right"><a href="#top">Up</a></div>
<hr /><hr />
<a NAME="Settings" ID="Settings"></a>
<h2>Settings</h2>

<h3>Derived from</h3>
object
<h3>Class Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<td><a href="#Settings.__init__">Settings</a></td>
<td></td>
</tr><tr>
<td><a href="#Settings.defaults">defaults</a></td>
<td></td>
</tr><tr>
<td><a href="#Settings.dict">dict</a></td>
<td></td>
</tr><tr>
<td><a href="#Settings.get">get</a></td>
<td></td>
</tr><tr>
<td><a href="#Settings.getInterWiki">getInterWiki</a></td>
<td></td>
</tr><tr>
<td><a href="#Settings.importFormData">importFormData</a></td>
<td></td>
</tr><tr>
<td><a href="#Settings.read">read</a></td>
<td></td>
</tr><tr>
<td><a href="#Settings.save">save</a></td>
<td></td>
</tr>
</table>
<a NAME="Settings.__init__" ID="Settings.__init__"></a>
<h4>Settings (Constructor)</h4>
<b>Settings</b>(<i></i>)
<a NAME="Settings.defaults" ID="Settings.defaults"></a>
<h4>Settings.defaults</h4>
<b>defaults</b>(<i></i>)
<a NAME="Settings.dict" ID="Settings.dict"></a>
<h4>Settings.dict</h4>
<b>dict</b>(<i></i>)
<a NAME="Settings.get" ID="Settings.get"></a>
<h4>Settings.get</h4>
<b>get</b>(<i>k</i>)
<a NAME="Settings.getInterWiki" ID="Settings.getInterWiki"></a>
<h4>Settings.getInterWiki</h4>
<b>getInterWiki</b>(<i></i>)
<a NAME="Settings.importFormData" ID="Settings.importFormData"></a>
<h4>Settings.importFormData</h4>
<b>importFormData</b>(<i>r</i>)
<a NAME="Settings.read" ID="Settings.read"></a>
<h4>Settings.read</h4>
<b>read</b>(<i></i>)
<a NAME="Settings.save" ID="Settings.save"></a>
<h4>Settings.save</h4>
<b>save</b>(<i></i>)

<div align="right"><a href="#top">Up</a></div>
<hr /><hr />
<a NAME="SettingsHandler" ID="SettingsHandler"></a>
<h2>SettingsHandler</h2>

<h3>Derived from</h3>
BasePublicPage
<h3>Class Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<td><a href="#SettingsHandler.get">get</a></td>
<td></td>
</tr><tr>
<td><a href="#SettingsHandler.post">post</a></td>
<td></td>
</tr>
</table>
<a NAME="SettingsHandler.get" ID="SettingsHandler.get"></a>
<h4>SettingsHandler.get</h4>
<b>get</b>(<i></i>)
<a NAME="SettingsHandler.post" ID="SettingsHandler.post"></a>
<h4>SettingsHandler.post</h4>
<b>post</b>(<i></i>)

<div align="right"><a href="#top">Up</a></div>
<hr /><hr />
<a NAME="UpgradeHandler" ID="UpgradeHandler"></a>
<h2>UpgradeHandler</h2>

<h3>Derived from</h3>
BasePublicPage
<h3>Class Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<td><a href="#UpgradeHandler.get">get</a></td>
<td></td>
</tr>
</table>
<a NAME="UpgradeHandler.get" ID="UpgradeHandler.get"></a>
<h4>UpgradeHandler.get</h4>
<b>get</b>(<i></i>)

<div align="right"><a href="#top">Up</a></div>
<hr /><hr />
<a NAME="UserProfileHandler" ID="UserProfileHandler"></a>
<h2>UserProfileHandler</h2>
<p>
Allows a user to view another user's profile.  All users are able to
     view this information by requesting http://wikiapp.appspot.com/user/*
</p>
<h3>Derived from</h3>
BasePublicPage
<h3>Class Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<td><a href="#UserProfileHandler.get">get</a></td>
<td>When requesting the URL, we find out that user's WikiUser information.</td>
</tr>
</table>
<a NAME="UserProfileHandler.get" ID="UserProfileHandler.get"></a>
<h4>UserProfileHandler.get</h4>
<b>get</b>(<i>user</i>)
<p>
When requesting the URL, we find out that user's WikiUser information.
       We also retrieve articles written by the user
</p>
<div align="right"><a href="#top">Up</a></div>
<hr /><hr />
<a NAME="UsersHandler" ID="UsersHandler"></a>
<h2>UsersHandler</h2>

<h3>Derived from</h3>
BasePublicPage
<h3>Class Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<td><a href="#UsersHandler.get">get</a></td>
<td></td>
</tr><tr>
<td><a href="#UsersHandler.post">post</a></td>
<td></td>
</tr>
</table>
<a NAME="UsersHandler.get" ID="UsersHandler.get"></a>
<h4>UsersHandler.get</h4>
<b>get</b>(<i></i>)
<a NAME="UsersHandler.post" ID="UsersHandler.post"></a>
<h4>UsersHandler.post</h4>
<b>post</b>(<i></i>)

<div align="right"><a href="#top">Up</a></div>
<hr /><hr />
<a NAME="ViewDiffHandler" ID="ViewDiffHandler"></a>
<h2>ViewDiffHandler</h2>

<h3>Derived from</h3>
BasePublicPage
<h3>Class Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<td><a href="#ViewDiffHandler.get">get</a></td>
<td></td>
</tr>
</table>
<a NAME="ViewDiffHandler.get" ID="ViewDiffHandler.get"></a>
<h4>ViewDiffHandler.get</h4>
<b>get</b>(<i>page_title, first_revision, second_revision</i>)

<div align="right"><a href="#top">Up</a></div>
<hr /><hr />
<a NAME="ViewHandler" ID="ViewHandler"></a>
<h2>ViewHandler</h2>

<h3>Derived from</h3>
BasePublicPage
<h3>Class Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<td><a href="#ViewHandler.get">get</a></td>
<td></td>
</tr><tr>
<td><a href="#ViewHandler.get_content">get_content</a></td>
<td>Checks memcache for the page.</td>
</tr><tr>
<td><a href="#ViewHandler.get_edit">get_edit</a></td>
<td></td>
</tr><tr>
<td><a href="#ViewHandler.get_page_content">get_page_content</a></td>
<td>When memcache lookup fails, we want to query the information from the datastore and return it.</td>
</tr><tr>
<td><a href="#ViewHandler.get_view">get_view</a></td>
<td></td>
</tr>
</table>
<a NAME="ViewHandler.get" ID="ViewHandler.get"></a>
<h4>ViewHandler.get</h4>
<b>get</b>(<i>page_name=None</i>)
<a NAME="ViewHandler.get_content" ID="ViewHandler.get_content"></a>
<h4>ViewHandler.get_content</h4>
<b>get_content</b>(<i>page_title, revision_number</i>)
<p>
Checks memcache for the page.  If the page exists in memcache, it
       returns the information.  If not, it calls get_page_content, gets the
       page content from the datastore and sets the memcache with that info
</p><a NAME="ViewHandler.get_edit" ID="ViewHandler.get_edit"></a>
<h4>ViewHandler.get_edit</h4>
<b>get_edit</b>(<i>page_name</i>)
<a NAME="ViewHandler.get_page_content" ID="ViewHandler.get_page_content"></a>
<h4>ViewHandler.get_page_content</h4>
<b>get_page_content</b>(<i>page_title, revision_number=1</i>)
<p>
When memcache lookup fails, we want to query the information from
       the datastore and return it.  If the data isn't in the data store,
       simply return empty strings
</p><a NAME="ViewHandler.get_view" ID="ViewHandler.get_view"></a>
<h4>ViewHandler.get_view</h4>
<b>get_view</b>(<i>page_name</i>)

<div align="right"><a href="#top">Up</a></div>
<hr /><hr />
<a NAME="ViewRevisionListHandler" ID="ViewRevisionListHandler"></a>
<h2>ViewRevisionListHandler</h2>

<h3>Derived from</h3>
BasePublicPage
<h3>Class Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<td><a href="#ViewRevisionListHandler.get">get</a></td>
<td></td>
</tr>
</table>
<a NAME="ViewRevisionListHandler.get" ID="ViewRevisionListHandler.get"></a>
<h4>ViewRevisionListHandler.get</h4>
<b>get</b>(<i>page_title</i>)

<div align="right"><a href="#top">Up</a></div>
<hr /><hr />
<a NAME="main" ID="main"></a>
<h2>main</h2>
<b>main</b>(<i></i>)

<div align="right"><a href="#top">Up</a></div>
<hr />
</body></html>